POST: http://www.nomedoseusite.com.br/api_categories.php?action=edit_status_categories
Parameter | Format | Description |
categories_id | JSON | Categorie or Sub-Categorie ID Only number is required Format: int(11) * FIELD REQUIRED |
categories_status | JSON | 1 = ACTIVE or 0 = INACTIVE Only number is required Format: int(1) * FIELD REQUIRED |
PHP Sample
// sample edit status categories and sub-categories $url = $domain_url . '/api_categories.php?action=edit_status_categories'; $data = array("categories_id" => "182", // Categorie or Sub-Categorie ID (Only number is required) * FIELD REQUIRED "categories_status" => "1" // 1 = ACTIVE or 0 = INACTIVE (Only number is required) * FIELD REQUIRED ); $data_string = json_encode($data); $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', "Cache-Control: no-cache", 'Usuario1: ' . base64_encode($usuario1), 'Senha1: ' . base64_encode($senha1), 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); curl_close($ch); print_r($result); // sample edit status categories and sub-categories eof
Return Error:
code
message
Return Success:
code
id
message